package com.ruoyi.profile.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.profile.mapper.RestockMapper;
import com.ruoyi.profile.domain.Restock;
import com.ruoyi.profile.service.IRestockService;

/**
 * 采购入库Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-16
 */
@Service
public class RestockServiceImpl implements IRestockService 
{
    @Autowired
    private RestockMapper restockMapper;

    /**
     * 查询采购入库
     * 
     * @param id 采购入库主键
     * @return 采购入库
     */
    @Override
    public Restock selectRestockById(Long id)
    {
        return restockMapper.selectRestockById(id);
    }

    /**
     * 查询采购入库列表
     * 
     * @param restock 采购入库
     * @return 采购入库
     */
    @Override
    public List<Restock> selectRestockList(Restock restock)
    {
        return restockMapper.selectRestockList(restock);
    }

    /**
     * 新增采购入库
     * 
     * @param restock 采购入库
     * @return 结果
     */
    @Override
    public int insertRestock(Restock restock)
    {
        return restockMapper.insertRestock(restock);
    }

    /**
     * 修改采购入库
     * 
     * @param restock 采购入库
     * @return 结果
     */
    @Override
    public int updateRestock(Restock restock)
    {
        return restockMapper.updateRestock(restock);
    }

    /**
     * 批量删除采购入库
     * 
     * @param ids 需要删除的采购入库主键
     * @return 结果
     */
    @Override
    public int deleteRestockByIds(Long[] ids)
    {
        return restockMapper.deleteRestockByIds(ids);
    }

    /**
     * 删除采购入库信息
     * 
     * @param id 采购入库主键
     * @return 结果
     */
    @Override
    public int deleteRestockById(Long id)
    {
        return restockMapper.deleteRestockById(id);
    }
}
